package com.asia5b.a5mall.middleware.widget.refresh

import android.content.Context
import android.util.AttributeSet
import com.scwang.smartrefresh.header.MaterialHeader
import com.scwang.smartrefresh.layout.SmartRefreshLayout

class AutoRefreshLayout(context: Context?, attrs: AttributeSet?) : SmartRefreshLayout(context, attrs) {
    init {
        setEnableLoadMore(true)
        setEnableAutoLoadMore(true)
        setRefreshHeader(MaterialHeader(context))
    }

    fun finishRefreshAndLoadmore() {
        finishLoadMore()
        finishRefresh()
    }
}